﻿/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __B103E03B_3164_436c_8299_4052729399AC__
#define __B103E03B_3164_436c_8299_4052729399AC__

/////////////////////////////////////////////////////////////////////////////////////////
// 
namespace xos
{
    // 
    // xos api interface
    // 
    class i_xos : public xos::i_release
    {
    public:
        // 
        // enum for xos object type
        // 
        enum enumXosObj
        {
            XOS_OBJ_DIR_MONITOR,

            XOS_OBJ_CRT,

            XOS_OBJ_DYNAMIC,

            XOS_OBJ_THREAD,

            XOS_OBJ_FILE,
            XOS_OBJ_DIR,

            XOS_OBJ_MISC,

            XOS_OBJ_SOCKET,
            XOS_OBJ_SELECT,

            XOS_OBJ_SPIN_LOCK,
            XOS_OBJ_MUTX_LOCK,
            XOS_OBJ_EVENT,

            XOS_OBJ_TIME
        };

    public:
        virtual ~i_xos(){}

    public:
        // 
        // create xos object
        // 
        virtual int create( enumXosObj enumType, void ** ppv ) = 0;
    };

    // 
    // export function for i_xos
    // 
    typedef int ( * f_create )( i_xos ** ppv );
}

#endif // __B103E03B_3164_436c_8299_4052729399AC__
